package com.teamcenter.rac.massupdate.databinding;

import com.teamcenter.rac.massupdate.model.UpdateJobModel;

public class OperationTypeChangeObservable
  extends AbstractModelObservable
{
  public void doSetValue(Object paramObject)
  {
    super.doSetValue(paramObject);
    UpdateJobModel localUpdateJobModel = getUpdateJobModel();
    switch ((com.teamcenter.rac.massupdate.model.UpdateJobModel.OperationType)paramObject)
    {
    case ADD_PART: 
    case ADD_PART_AS_SUBSTITUTE: 
      localUpdateJobModel.setInputLabelText(UpdateJobModel.LABEL_TEXT_ADD);
      localUpdateJobModel.setInputLabelTextWithColon(UpdateJobModel.LABEL_TEXT_ADD_WITH_COLON);
      localUpdateJobModel.setReplacementPartRequired(true);
      break;
    case REPLACE_PART: 
    case REPLACE_PART_AND_KEEP_AS_SUBSTITUTE: 
    case REPLACE_SUBSTITUTE: 
      localUpdateJobModel.setInputLabelText(UpdateJobModel.LABEL_TEXT_REPLACEMENT);
      localUpdateJobModel.setInputLabelTextWithColon(UpdateJobModel.LABEL_TEXT_REPLACEMENT_WITH_COLON);
      localUpdateJobModel.setReplacementPartRequired(true);
      break;
    case MANUAL_UPDATE: 
    case NOT_SET: 
    case REMOVE_PART_AND_KEEP_SUBSTITUTE: 
    case REMOVE_PART_AND_SUBSTITUTE: 
    case REMOVE_SUBSTITUTE: 
      localUpdateJobModel.setInputLabelText("");
      localUpdateJobModel.setInputLabelTextWithColon("");
      localUpdateJobModel.setReplacementPartRequired(false);
      localUpdateJobModel.setReplacementPart(null);
    }
    localUpdateJobModel.setImpactedPartsUpToDate(false);
  }
}

